<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<span th:if="${age>18}">成年了</span>
<span th:unless="${age>18}">未成年</span>
</body>
</html>